package cn.ultrarisk.sprinx.mybatis.entity;

import cn.ultrarisk.sprinx.mybatis.annotation.Table;

import java.util.LinkedHashMap;
import java.util.Map;

/**
 * User
 *
 * @author sevendlong(lin23871@163.com)
 * @date 2014/10/9
 * @since V1.0
 */
@Table(table = Employee.TABLE, idColumn = Employee.ID, autoIncrement = true)
public class Employee {
    public static final String TABLE = "employee";

    public static final String ID = "id";
    public static final String DEPT_ID = "dept_id";
    public static final String NAME = "name";
    public static final String SALARY = "salary";
    public static final String AGE = "age";
    public static final String SEX = "sex";

    public static final Map<String, String> COLUMN_PROPERTY_MAP = new LinkedHashMap<String, String>();

    static {
        COLUMN_PROPERTY_MAP.put(ID, "id");
        COLUMN_PROPERTY_MAP.put(DEPT_ID, "deptId");
        COLUMN_PROPERTY_MAP.put(NAME, "name");
        COLUMN_PROPERTY_MAP.put(SALARY, "salary");
        COLUMN_PROPERTY_MAP.put(AGE, "age");
        COLUMN_PROPERTY_MAP.put(SEX, "sex");
    }

    private Integer id;
    private Integer deptId;
    private String name;
    private Double salary;
    private Integer age;
    private String sex;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getDeptId() {
        return deptId;
    }

    public void setDeptId(Integer deptId) {
        this.deptId = deptId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Double getSalary() {
        return salary;
    }

    public void setSalary(Double salary) {
        this.salary = salary;
    }
}
